package com.bookstore.bean;

import java.util.Date;

/***
 * Book 书本、商品类
 *   int bookId;书本ID
 * int userId;用户、买家ID
 * String bookName;书名
 * double price;价格
 * int sales;销量
 * String publisher 出版商、出版社
 * String bookPath;书的图片的路径
 * Date pubDate;出版日期
 */
public class Book {
    private int bookId;
    private int userId;
    private String bookName;
    private double price;
    private int sales;
    private String publisher;
    private String bookPath;
    private Date pubDate;

    public Book() {
    }

    public Book(int bookId, int userId, String bookName, double price, int sales, String publisher, String bookPath, Date pubDate) {
        this.bookId = bookId;
        this.userId = userId;
        this.bookName = bookName;
        this.price = price;
        this.sales = sales;
        this.publisher = publisher;
        this.bookPath = bookPath;
        this.pubDate = pubDate;
    }

    public String getBookPath() {
        return bookPath;
    }

    public void setBookPath(String bookPath) {
        this.bookPath = bookPath;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getSales() {
        return sales;
    }

    public void setSales(int sales) {
        this.sales = sales;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Date getPubDate() {
        return pubDate;
    }

    public void setPubDate(Date pubDate) {
        this.pubDate = pubDate;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookId=" + bookId +
                ", userId=" + userId +
                ", bookName='" + bookName + '\'' +
                ", price=" + price +
                ", sales=" + sales +
                ", publisher='" + publisher + '\'' +
                ", pubDate=" + pubDate +
                '}';
    }
}
